package testing;

import java.io.IOException;
import java.util.ArrayList;

import org.junit.Assert;
import org.junit.Test;

import service.SiloService;

public class SiloAdapterTest {

	@Test
	public void testConnectionSourceData() throws IOException {
		SiloService siloService = new SiloService();
		siloService.createSiloAdapter("192.168.200.57", "5555");

		ArrayList<String[]> sourceData = siloService.getSiloAdapters().get(0)
				.requestSourceSiloData();

		Assert.assertNotNull(sourceData);
		Assert.assertTrue(sourceData.size() > 0);

	}

	@Test
	public void testConnectionCurrentData() throws IOException {
		SiloService siloService = new SiloService();
		siloService.createSiloAdapter("192.168.200.57", "5555");

		ArrayList<String[]> sourceData = siloService.getSiloAdapters().get(0)
				.requestCurrentSiloData();

		Assert.assertNotNull(sourceData);
		Assert.assertTrue(sourceData.size() > 0);

	}

}
